package cn.class2.demo6

/**
  * Created by lzd on 2018/11/14.
  * list匹配
  */
object Demo4 {
  def main(args: Array[String]): Unit = {
    val lst = List(1, 3, 6)
    println(lst.head)
    println(lst.tail)
    lst match {
      case 11 :: Nil => println(lst)
      case 1 :: x => println(x)
      case x :: List(3, 6) => println(x)
      case _ => println("NO ....")
    }
  }
}
